<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let obj = {
      name: 'kkk',
      age: 18
    }

    function iterate(obj) {
      let keyList = Object.keys(obj)
      for (let i = 0; i < keyList.length; i++) {
        keyList[i] = `${keyList[i]}: ${obj[keyList[i]]}`
      }
      return keyList
    }

    console.log(iterate(obj));
  </script>
</body>

</html>